import request from '@/utils/request.js'

// 新增隐患
export function addHazards(data) {
  return request({
    url: '/business/hazards',
    method: 'post',
    data: data
  })
}
// 获取隐患详细信息
export function getHazardsInfo(id) {
  return request({
    url: '/business/hazards/' + id,
    method: 'get'
  })
}
// 验收隐患
export function checkHazards(data) {
  return request({
    url: '/business/hazards/check',
    method: 'post',
    data: data
  })
}
// 处理整改隐患
export function handleHazards(data) {
  return request({
    url: '/business/hazards/handle',
    method: 'post',
    data: data
  })
}
// 查看指定隐患列表
export function getHazardsList(query) {
  return request({
    url: '/business/hazards/list',
    method: 'get',
    params: query
  })
}